<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('初始化月账单')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bill-add">
            <p>初始化数据不会覆盖已经存在的数据，仅插入未初始化的数据</p>
           <div class="form-group">
                <label class="col-sm-3 control-label is-required">年：</label>
                <div class="col-sm-8">
                    <input name="billYear" id="billYear" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">月：</label>
                <div class="col-sm-8">
                    <input name="billMonth" id="billMonth" class="form-control" type="text" required>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/bill"
        $("#form-bill-add").validate({
            focusCleanup: true,
            rules: {
                billYear:{
                    digits: true,
                    min: 1997,
                    max: 2100
                },
                billMonth: {
                    digits: true,
                    min: 1,
                    max: 12
                }
            }
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/init", $('#form-bill-add').serialize());
            }
        }

    </script>
</body>
</html>